package com.hejjon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hejjon.core.domain.entity.BusinessFeature;
import com.hejjon.domain.request.BusinessFeatureCreateRequest;
import com.hejjon.domain.request.BusinessFeatureQueryRequest;
import com.hejjon.domain.request.BusinessFeatureUpdateRequest;
import com.hejjon.domain.response.BusinessFeatureCreateResponse;
import com.hejjon.domain.response.BusinessFeatureQueryResponse;
import com.hejjon.domain.response.BusinessFeatureRemoveResponse;
import com.hejjon.domain.response.BusinessFeatureUpdateResponse;
import com.hejjon.domain.vo.BusinessFeatureVO;

import java.util.List;

/**
 * @author: cs
 * @date: 2025-05-13 20:52:41
 * @since: 1.0
 */
public interface IBusinessFeatureService extends IService<BusinessFeature> {

    /**
     * 创建业务特征
     * @param request
     * @return
     */
    BusinessFeatureCreateResponse create(BusinessFeatureCreateRequest request);

    /**
     * 更新业务特征
     * @param request
     * @return
     */
    BusinessFeatureUpdateResponse update(BusinessFeatureUpdateRequest request);

    /**
     * 根据名称和显示名称判断是否为空
     * @param name
     * @param label
     * @return
     */
    boolean existByNameAndLabel(String name, String label);


    /**
     * 查询业务特征树
     * @param request
     * @return
     */
    BusinessFeatureQueryResponse queryTreeData(BusinessFeatureQueryRequest request);


    /**
     * 查询扁平列表
     */
    List<BusinessFeatureVO> queryList(BusinessFeatureQueryRequest request);


    /**
     * 删除业务特征（对象）
     * @param id
     * @return
     */
    BusinessFeatureRemoveResponse removeById(String id);

    /**
     * 获取创建表sql语句
     * @param featureId
     * @return
     */
    String getCreateTableSql(String featureId);

    /**
     * 获取创建表sql语句
     */
    String getCreateTableSql(String featureId, String tableName, String featureLabel);




}
